home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4879 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: damon.irf.uni.dortmund.de!broth
  2. From: rothert@damon.irf.uni-dortmund.de (Bernd Rothert)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Incompatibility between BC4.5 32 bit DLL and MSVC 2.0 exe
  5. Date: Thu, 01 Feb 96 13:37:25 GMT
  6. Organization: Institute of Robotics Research
  7. Message-ID: <4eqfte$k3f@damon.irf.uni-dortmund.de>
  8. References: <4epure$k3p@idefix.eunet.fi>
  9. NNTP-Posting-Host: broth.irf
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <4epure$k3p@idefix.eunet.fi>,
  13.    Planmeca Oy <fipdt4d9@ibmmail.com> wrote:
  14. >We have a "minor" problem. Part of our development team is developing 
  15. >(32 bit) DLL:s with BC4.5 c++. Another part is developing the application 
  16. >which needs to use that DLL. While trying to build the executable with 
  17. >the LIB generated by BC for that DLL, MSVC complains: invalid or 
  18. >corrupted library file.
  19.  
  20. There may be another problem besides the compatibility of the import library 
  21. formats: I tried the same mix with 16-bit code (GUI with MSVC 1.51, kernel 
  22. with BC++ 4.5) - it didn't work. After "some" debugging I discovered that some 
  23. of the the BC++ 4.5 compiled DLL functions modified the callers data segment 
  24. contents when exception handling has been enabled(the default). The BC++ 4.5 
  25. code uses some absolute addresses inside the stack segment (= caller's DS) for 
  26. exception handling.
  27.  
  28. The modification of the caller's data segment is not a problem if the .EXE has 
  29. been compiled with BC++ 4.5. The critical area is DS:0014H - DS:0037H where 
  30. the compiler stores its exception list etc. - see \BC45\lib\startup\c0w.asm 
  31. and c0d.asm
  32.  
  33. I also doubt if you can import objects in a MSVC-EXE exported by a BC45-DLL 
  34. (different internal representations!?).
  35.  
  36. Bernd
  37.